package com.ltmonitor.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

/**
 * 围栏绑定类，
 * @author Administrator
 *
 */

@Entity
@Table(name="MapAreaBinding")
@org.hibernate.annotations.Proxy(lazy = false)
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) 
public class MapAreaBinding extends TenantEntity{
	
	public static String BINDING_TERMINAL = "terminal";
	
	public static String BINDING_PLATFORM = "platform";
	
	private long areaId;
	/**
	 * 绑定车辆
	 */
	private long vehicleId;
	/**
	 * platform,绑定到平台，由平台报警,terminal 绑定到终端，由终端报警
	 */
	private String bindType;
	
	/**
	 * 终端绑定区域时，下发的命令Id,用于跟踪绑定状态
	 */
	private long commandId;
	/**
	 * 配置终端的操作类型 0：更新区域； 1：追加区域； 2：修改区域 ；3 删除单个区域
	 */
	private int configType;
	
	
	public MapAreaBinding()
	{
		createDate = new Date();
	}
	public MapAreaBinding(int _eId, int _vId)
	{
		areaId = _eId;
		vehicleId = _vId;
		createDate = new Date();
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "bindId", unique = true, nullable = false)
	private long entityId;
	public  long getEntityId() {
		return entityId;
	}
	public  void setEntityId(long value) {
		entityId = value;
	}
	
	public long getVehicleId() {
		return vehicleId;
	}
	public void setVehicleId(long vehicleId) {
		this.vehicleId = vehicleId;
	}
	public long getCommandId() {
		return commandId;
	}
	public void setCommandId(long commandId) {
		this.commandId = commandId;
	}
	public int getConfigType() {
		return configType;
	}
	public void setConfigType(int configType) {
		this.configType = configType;
	}
	public String getBindType() {
		return bindType;
	}
	public void setBindType(String bindType) {
		this.bindType = bindType;
	}
	public long getAreaId() {
		return areaId;
	}
	public void setAreaId(long areaId) {
		this.areaId = areaId;
	}

}
